<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>专家信用管理</title>
	<script src="../../js/header.js"></script>
	<style type="text/css">
		html, body, #companycredit {
			padding: 0px;
			margin: 0px;
			/*height: 100%;*/
		}
		#companycredit{
			border-top: 3px solid #0D9AFF;
			/*background: #FFFFFF;
			box-shadow: 0px 2px 4px 0 rgba(200,200,200,0.50);*/
			padding: 25px;
			/*background: url(../../images/bg.png) no-repeat;
			background-size: 100% 100%;*/
			/*background-attachment: fixed;*/
			/*overflow: hidden;*/
		}
		.tab-title{
			font-size: 16px;
			font-weight: bold;
			border-left: 4px solid #0D9AFF;
			font-family: PingFangSC-Medium;
			padding-left:10px;
			margin-bottom: 20px;
		}
		.el-dialog__footer {
			padding: 10px 20px 20px;
			text-align: center;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
		}
		.el-dialog__body {
			color: rgb(96, 98, 102);
			font-size: 14px;
			word-break: break-all;
			padding: 0px 20px;
		}
		#excel {
			display: none;
		}
		.el-input__inner {
			-webkit-appearance: none;
			background-color: #FFF;
			background-image: none;
			border-radius: 4px;
			border: 1px solid #DCDFE6;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			color: #606266;
			display: inline-block;
			font-size: inherit;
			height: 30px;
			line-height: 30px;
			outline: 0;
			padding: 0 15px;
			-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
			transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		}
		#companycredit .el-select,
		#companycredit .el-input-number{
			width: 100%;
		}
		.listed .el-form-item__label{
			letter-spacing: 3px;
		}
		.el-textarea {
			width: 100%;
		}

		/* 搜索按钮样式修改 */
		#companycredit .el-button.is-circle.search_btn{
			position: absolute;
			right: 0;
			top: 0;
			border: 0;
			background: none;
		}
		#companycredit .el-button.is-circle.search_btn i{
			font-size: 17px;
		}

		.companycredit_gonggao .el-form-item__content{
			margin-left: 0!important;
		}
		#companycredit .companycredit_publicstate .el-select{
			width: auto;
		}

		/* 拟制公告---封装样式 */
		.content_tab{
			padding: 20px 0;
		}
		.border_btm{
			border-bottom: 1px solid #ddd;
		}
		.border_left{
			border-left: 1px solid #ddd;
		}
	</style>
</head>

<body>
<div v-cloak id="companycredit">
	<div style="margin-top: 10px;">
		<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
			<el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
				<el-row>
					<el-col :span="6">
						<el-form-item label="专家评分编号:" prop="" label-width="130px">
							<el-input v-model="selectForm.expertCode" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
					<el-col span="7">
						<el-form-item label="专家名称:" prop="" label-width="120px">
							<el-input v-model="selectForm.expertName" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
					<el-col span="10">
						<el-form-item label="证件号码:">
							<el-row>
								<el-form-item prop="">
									<el-input v-model="selectForm.expertIdcard" placeholder="" ></el-input>
								</el-form-item>
							</el-row>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="6">
						<el-form-item label="证件类型:" prop="" label-width="130px">
                            <el-tooltip class="item" effect="dark" content="请优先选择居民身份证" placement="top-start">
							<el-select v-model="selectForm.certype" placeholder="请选择证件类型">
								<el-option label="居民身份证" value="111"></el-option>
								<el-option label="临时居民身份证" value="112"></el-option>
								<el-option label="户口簿" value="113"></el-option>
								<el-option label="中国人民解放军军官证" value="114"></el-option>
								<el-option label="中国人民武警警察部队警官证" value="115"></el-option>
								<el-option label="出生医学证明" value="117"></el-option>
								<el-option label="中国人民解放军士兵证" value="118"></el-option>
								<el-option label="中国人民武警警察部队士兵证" value="119"></el-option>
								<el-option label="中国人民解放军文职人员证" value="120"></el-option>
								<el-option label="中国人民武装警察部队文职人员证" value="122"></el-option>
								<el-option label="居住证" value="154"></el-option>
								<el-option label="外交护照" value="411"></el-option>
								<el-option label="公务护照" value="412"></el-option>
								<el-option label="公务普通护照" value="413"></el-option>
								<el-option label="普通护照" value="414"></el-option>
								<el-option label="旅行证" value="415"></el-option>
							</el-select>
                            </el-tooltip>
						</el-form-item>
					</el-col>
					<el-col :span="7">
						<el-form-item label="专家分类:" prop="" label-width="120px">
							<el-form-item prop="">
								<el-tooltip class="item" effect="dark" content="C表示大盘，A/B优于大盘，D/E差于大盘。" placement="top-start">
									<el-select v-model="selectForm.expertClassification" placeholder="请选择专家类型">
										<el-option label="A" value="1"></el-option>
										<el-option label="B" value="2"></el-option>
										<el-option label="C" value="3"></el-option>
										<el-option label="D" value="4"></el-option>
										<el-option label="E" value="5"></el-option>
									</el-select>
								</el-tooltip>
							</el-form-item>
						</el-form-item>
					</el-col>
					<el-col :span="5">
						<el-form-item label="专家信用分数:" prop="">
							<el-form-item prop="">
								<el-tooltip class="item" effect="dark" content="专家信用分数介于1000~2000之间" placement="top-start">
									<el-input v-model="selectForm.expertScore" type="number" @blur="checkPriseScore()" :min="0" @keydown.native="channelInput"></el-input>
								</el-tooltip>
							</el-form-item>
						</el-form-item>
					</el-col>
					<el-col :span="5">
						<el-form-item label="专家等级:" prop="">
							<el-select v-model="selectForm.expertLevl" placeholder="请选择专家等级" :disabled="formDisabled">
								<el-option label="国家级" value="2"></el-option>
								<el-option label="省级" value="1"></el-option>

							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row style="margin-bottom: 30px;">
					<div style="float: right;">
						<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="apply">申请</el-button>
						<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
						<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
					</div>
				</el-row>
			</el-form>
		</div>

		<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
			<!--<el-table-column type="selection" ></el-table-column>-->
			<el-table-column
					prop="expertCode"
					label="专家评分编号"
					width="200"
					align="center" >
			</el-table-column>
			<el-table-column
					prop="expertName"
					label="专家名称"
					width="250"
					align="center">
			</el-table-column>
			<el-table-column
					prop="expertIdcard"
					label="证件号码"
					width="200"
					align="center">
			</el-table-column>
			<el-table-column
					prop="certype"
					label="证件类型"
					width="140"
					align="center">
				<template scope="scope">
					<span v-if="scope.row.certype==111">居民身份证</span>
					<span v-if="scope.row.certype==112">临时居民身份证</span>
					<span v-if="scope.row.certype==113">户口簿</span>
					<span v-if="scope.row.certype==114">中国人民解放军军官证</span>
					<span v-if="scope.row.certype==115">中国人民武警警察部队警官证</span>
					<span v-if="scope.row.certype==117">出生医学证明</span>
					<span v-if="scope.row.certype==118">中国人民解放军士兵证</span>
					<span v-if="scope.row.certype==119">中国人民武警警察部队士兵证</span>
					<span v-if="scope.row.certype==120">中国人民解放军文职人员证</span>
					<span v-if="scope.row.certype==122">中国人民武装警察部队文职人员证</span>
					<span v-if="scope.row.certype==154">居住证</span>
					<span v-if="scope.row.certype==411">外交护照</span>
					<span v-if="scope.row.certype==412">公务护照</span>
					<span v-if="scope.row.certype==413">公务普通护照</span>
					<span v-if="scope.row.certype==414">普通护照</span>
					<span v-if="scope.row.certype==415">旅行证</span>
				</template>
			</el-table-column>
			<el-table-column
					prop="expertScore"
					label="专家信用分数"
					width="120"
					align="center">
			</el-table-column>
			<el-table-column
					prop="expertClassification"
					label="专家分类"
					width="100"
					align="center">
				<template scope="scope">
					<span v-if="scope.row.expertClassification==1">A</span>
					<span v-if="scope.row.expertClassification==2">B</span>
					<span v-if="scope.row.expertClassification==3">C</span>
					<span v-if="scope.row.expertClassification==4">D</span>
					<span v-if="scope.row.expertClassification==5">E</span>
				</template>
			</el-table-column>
			<el-table-column
					prop="expertLevl"
					label="专家等级"
					width="100"
					align="center">
				<template scope="scope">
					<span v-if="scope.row.expertLevl==2">国家级</span>
					<span v-if="scope.row.expertLevl==1">省级</span>

				</template>
			</el-table-column>
			<el-table-column
					label="操作"
					align="center">
				<template slot-scope="scope">
					<el-button type="" size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
                    <span v-if="scope.row.organName == orgName">
					<el-button type="primary" size="mini" @click="edit(scope.$index,scope.row)">修改</el-button>
					<el-button type="danger" size="mini" @click="joinBlacklist(scope.$index,scope.row)">加入黑名单</el-button>
					<el-button v-if="scope.row.enterpriseNotice == 0 " type="info" size="mini" @click="gongGao(scope.$index,scope.row)">拟制公告</el-button>
					<el-button v-if="scope.row.enterpriseNotice != 0 " type="" size="mini" @click="gongGaoView(scope.$index,scope.row)">查看公告</el-button>
					<el-button type="danger" size="mini" @click="del(scope.$index,scope.row)">删除</el-button>
                    </span>
                </template>
			</el-table-column>
		</el-table>
		<div style="overflow: hidden;">
			<div class="pagination">
				<el-pagination
						@size-change="handleSizeChange"
						@current-change="handleCurrentChange"
						:current-page="currentPage"
						:page-sizes="[10, 20, 30, 40]"
						:page-size="pagesize"
						background
						layout="total, sizes,prev, pager, next"
						:total="tableTotal"
						prev-text="上一页"
						next-text="下一页">
				</el-pagination>
			</div>
		</div>

		<el-dialog title="" :visible.sync="dialogForm" center fullscreen>
			<div style="margin-top: 10px;">
				<el-form :model="companycredit" :rules="rules" ref="companycredit" label-width="140px">
					<!--企业信用信息表-->
					<el-row>
						<el-col :span="4" class="tab-title">
							专家信用信息表
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6">
							<el-form-item label="专家评分编号:" prop="expertCode">
								<el-tooltip class="item" effect="dark" content="专家评分编号字段唯一，不可重复！" placement="top-start">
									<!--<el-input v-model="companycredit.expertCode" placeholder="" :disabled="formDisabled"></el-input>-->
									<el-input v-model="companycredit.expertCode" placeholder="" :disabled="true"></el-input>
								</el-tooltip>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="专家名称:" prop="expertName" style="position: relative;">
								<el-input v-model="companycredit.expertName" placeholder="" maxlength="20" :disabled="formDisabled"></el-input>
								<el-button icon="el-icon-search" circle class="search_btn" :disabled="formDisabled" @click="onSearch();dialogFormVisible = true"></el-button>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col span="6">
							<el-form-item label="证件类型:" prop="certype">
                                <el-tooltip class="item" effect="dark" content="请优先选择居民身份证" placement="top-start">
								<el-select v-model="companycredit.certype" placeholder="请选择证件类型" @change="changeIdcardRule" :disabled="formDisabled" >

									<el-option label="居民身份证" value="111"></el-option>
									<el-option label="临时居民身份证" value="112"></el-option>
									<el-option label="户口簿" value="113"></el-option>
									<el-option label="中国人民解放军军官证" value="114"></el-option>
									<el-option label="中国人民武警警察部队警官证" value="115"></el-option>
									<el-option label="出生医学证明" value="117"></el-option>
									<el-option label="中国人民解放军士兵证" value="118"></el-option>
									<el-option label="中国人民武警警察部队士兵证" value="119"></el-option>
									<el-option label="中国人民解放军文职人员证" value="120"></el-option>
									<el-option label="中国人民武装警察部队文职人员证" value="122"></el-option>
									<el-option label="居住证" value="154"></el-option>
									<el-option label="外交护照" value="411"></el-option>
									<el-option label="公务护照" value="412"></el-option>
									<el-option label="公务普通护照" value="413"></el-option>
									<el-option label="普通护照" value="414"></el-option>
									<el-option label="旅行证" value="415"></el-option>
								</el-select>
                                </el-tooltip>
							</el-form-item>
						</el-col>
						<el-col span="12">
							<el-form-item label="证件号码:" ref="expertIdcard" prop="expertIdcard" :refs="rules.expertIdcard" >
								<el-input v-model="companycredit.expertIdcard" placeholder="" :maxlength="50" show-word-limit :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6">
							<el-form-item label="专家信用分数:" prop="expertScore">
								<el-tooltip class="item" effect="dark" content="专家信用分数介于1000~2000之间" placement="top-start">
									<el-input v-model="companycredit.expertScore" type="number" @blur="checkPriseScore1()" :min="0" @keydown.native="channelInput" :disabled="formDisabled"></el-input>
								</el-tooltip>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="专家分类:" prop="expertClassification">
								<el-tooltip class="item" effect="dark" content="C表示大盘，A/B优于大盘，D/E差于大盘。" placement="top-start">
									<el-select v-model="companycredit.expertClassification" placeholder="请选择专家类型" :disabled="formDisabled">
										<el-option label="A" value="1"></el-option>
										<el-option label="B" value="2"></el-option>
										<el-option label="C" value="3"></el-option>
										<el-option label="D" value="4"></el-option>
										<el-option label="E" value="5"></el-option>
									</el-select>
								</el-tooltip>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="专家等级:" prop="expertLevl">
								<el-select v-model="companycredit.expertLevl" placeholder="请选择专家等级" :disabled="formDisabled">
									<el-option label="国家级" value="2"></el-option>
									<el-option label="省级" value="1"></el-option>

								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6">
							<el-form-item label="评估日期:" prop="assessmentDate">
								<el-date-picker
										v-model="companycredit.assessmentDate"
										type="date"
										value-format="yyyy-MM-dd"
										:disabled="formDisabled"
										placeholder="选择评估日期">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="作出评估决定机关:" prop="assessmentAuthority">
								<el-input v-model="companycredit.assessmentAuthority" placeholder="" maxlength="20" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row v-if="showMoveInList">
						<el-col :span="6">
							<el-form-item label="列入黑名单日期:" prop="abnormalPutdate">
								<!--v-model="companycredit.abnormalPutdate"-->
								<el-date-picker
										v-model="value1"
										:disabled=true
										type="date"
										class = "input-class"
										placeholder="选择列入黑名单日期">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="列入黑名单原因:" prop="specause">
								<el-input v-model="companycredit.specause" placeholder="" maxlength="100" show-word-limit :disabled="moveInDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="作出决定机关（列入）:" prop="decorg" label-width="170px">
								<el-input v-model="companycredit.decorg" placeholder="" maxlength="20" :disabled="moveInDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row v-if="showMoveOutList">
						<el-col :span="6">
							<el-form-item label="移出黑名单日期:" prop="remdate">
								<el-date-picker
										v-model="companycredit.remdate"
										:disabled="moveOutDisabled"
										type="date"
										placeholder="选择移出黑名单日期">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="移出黑名单原因:" prop="remexcpres">
								<el-input v-model="companycredit.remexcpres" placeholder="" maxlength="100" show-word-limit :disabled="moveOutDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="作出决定机关（移出）:" prop="redecorg" label-width="170px">
								<el-input v-model="companycredit.redecorg" placeholder="" maxlength="20" :disabled="moveOutDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22">
							<div style="float:right;">
								<el-button v-show="showOnSubmit" type="primary" size="small" style="width: 60px;height: 30px;" @click="onSubmit('companycredit')">提交</el-button>
								<el-button v-show="showOnJoinList" type="primary" size="small" style="width: 140px;height: 30px;" @click="onJoinBlackList()">加入黑名单</el-button>
								<el-button v-show="showOnReplace" type="primary" size="small" style="width: 60px;height: 30px;" @click="onReplace()">修改</el-button>
								<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogForm = false;clearForm()">取消</el-button>
							</div>
						</el-col>
					</el-row>
				</el-form>
			</div>
		</el-dialog>

		<el-dialog title="专家信息搜索" :before-close="handleDialogClose" :visible.sync="dialogFormVisible" width="70%">
			<el-form :inline="true" :model="formInline" class="demo-form-inline">
				<el-form-item label="专家名称">
					<el-input v-model="formInline.expertName" placeholder="请输入专家名称"></el-input>
				</el-form-item>
				<el-form-item>
					<el-button type="primary" @click="onSearch()">查询</el-button>
				</el-form-item>
			</el-form>
			<el-table
					:data="expertInformation"
					highlight-current-row
					@current-change="selectCurrentChange"
					style="width: 100%">
				<el-table-column
						fixed
						prop="expertName"
						label="专家名称">
				</el-table-column>
				<el-table-column
						fixed
						prop="expertSex"
						label="性别">
					<template scope="scope">
						<span v-if="scope.row.expertSex==1">男</span>
						<span v-if="scope.row.expertSex==2">女</span>
					</template>
				</el-table-column>
				<el-table-column
						prop="expertIdcard"
						label="证件号码">
				</el-table-column>
				<!--<el-table-column
						prop="comIdType"
						label="证件类型">
				</el-table-column>-->
				<!--<el-option label="国家级" value="2"></el-option>
				<el-option label="省级" value="1"></el-option>-->
				<el-table-column
						fixed
						prop="expertLevl"
						label="专家等级">
					<template scope="scope">
						<span v-if="scope.row.expertLevl==1">省级</span>
						<span v-if="scope.row.expertLevl==2">国家级</span>
					</template>
				</el-table-column>
			</el-table>
			<div style="overflow: hidden;">
				<div class="pagination">
					<el-pagination
							@size-change="handleSizeChange1"
							@current-change="handleCurrentChange1"
							:current-page="currentPage1"
							:page-sizes="[5, 10, 20, 40]"
							:page-size="pagesize1"
							background
							layout="total, sizes,prev, pager, next"
							:total="tableTotal1"
							prev-text="上一页"
							next-text="下一页">
					</el-pagination>
				</div>
			</div>
			<div slot="footer" class="dialog-footer" align="right">
				<el-button @click="dialogFormVisible = false;formInline.expertName = '';">取 消</el-button>
				<el-button type="primary" @click="onAddInformation()">确 定</el-button>
			</div>
		</el-dialog>

		<!-- 拟制公告 -->
		<el-dialog title="" :visible.sync="dialogGongGaoForm" center fullscreen>
			<div style="margin-top: 10px;">
				<el-form :model="gonggao" :rules="rules" ref="gonggao" label-width="140px">
					<!--专家信用信息拟制公告表-->
					<el-row>
						<el-col :span="4" class="tab-title">
							专家信用信息拟制公告表
						</el-col>
					</el-row>
					<el-row class="companycredit_gonggao">
						<el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
							<span style="color: red;">*</span>
							<span class="">标题:</span>
						</el-col>
						<el-col :span="12">
							<el-form-item prop="title">
								<el-input v-model="gonggao.title" style="" placeholder="" maxlength="300" show-word-limit></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row class="companycredit_publicstate">
						<el-col :span="6">
							<el-form-item label="公布类别:" prop="isPublic" label-width="120px">
								<el-radio-group disabled v-model="gonggao.isPublic">
									<el-radio label="0">公示通报</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row class="companycredit_publicstate">
						<el-col :span="6">
							<el-form-item label="公开状态:" prop="publicState" label-width="120px">
								<!--<el-select v-model="gonggao.publicState" placeholder="请选择公开状态">
									<el-option label="未公开" value="0"></el-option>
									<el-option label="公开" value="1"></el-option>
								</el-select>-->
								<el-radio-group v-model="gonggao.publicState">
									<el-radio :label="0">未公开</el-radio>
									<el-radio :label="1">公开</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row class="companycredit_publicstate">
						<el-col :span="14">
							<el-form-item label="公开地址类型:" prop="publicType" label-width="120px">
								<!--<el-select v-model="gonggao.publicType" placeholder="请选择公开状态">
									<el-option label="服务门户" value="0"></el-option>
									<el-option label="工作门户" value="1"></el-option>
								</el-select>-->
								<el-radio-group v-model="gonggao.publicType">
									<el-radio :label="0">服务门户</el-radio>
									<el-radio :label="1">工作门户</el-radio>
									<el-radio :label="2">服务门户和工作门户</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row style="margin: 0 0 20px;">
						<el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
							<span>内容:</span>
						</el-col>
						<el-col :span="12">
							<el-input
									type="textarea"
									:autosize="{ minRows: 8, maxRows: 8}"
									placeholder="请输入内容"
									maxlength="300"
									show-word-limit
									v-model="gonggao.attachContent">
							</el-input>
						</el-col>
					</el-row>

					<el-row style="margin: 0 0 20px;">
						<el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
							<span>附加内容:</span>
							<br/>
							<span style="color: red;">(不可修改)</span>
						</el-col>
						<!--<el-col :span="12" style="border: 1px solid #ddd;">
							<el-input type="textarea" :row="8" v-model="gonggao.content"></el-input>
						</el-col>-->
						<el-col :span="12" style="border: 1px solid #ddd;">
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>专家评分编号</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.expertCode }}</span>
								</el-col>
							</el-row>
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>专家名称</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.expertName }}</span>
								</el-col>
							</el-row>
							<!--<el-row class="border_btm">
								<el-col :span="4" class="border_left" style="padding: 22px 0px;text-align: center;">
									<span>证件类型</span>
								</el-col>
								<el-col :span="18" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.certype }}</span>
								</el-col>
							</el-row>-->
							<!--<el-row class="border_btm">
								<el-col :span="4" class="border_left" style="padding: 22px 0px;text-align: center;">
									<span>身份证号码</span>
								</el-col>
								<el-col :span="18" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.expertIdcard }}</span>
								</el-col>
							</el-row>-->
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>专家信用分数</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.expertScore }}</span>
								</el-col>
							</el-row>
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>专家分类</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span v-if="companycredit.expertClassification == 1" style="padding-left: 15px;">A</span>
									<span v-else-if="companycredit.expertClassification == 2" style="padding-left: 15px;">B</span>
									<span v-else-if="companycredit.expertClassification == 3" style="padding-left: 15px;">C</span>
									<span v-else-if="companycredit.expertClassification == 4" style="padding-left: 15px;">D</span>
									<span v-else-if="companycredit.expertClassification == 5" style="padding-left: 15px;">E</span>
								</el-col>
							</el-row>
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>专家等级</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span v-if="companycredit.expertLevl == 2" style="padding-left: 15px;">国家级</span>
									<span v-else-if="companycredit.expertLevl == 1" style="padding-left: 15px;">省级</span>
								</el-col>
							</el-row>
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>评估日期</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.assessmentDate }}</span>
								</el-col>
							</el-row>
							<el-row class="border_btm">
								<el-col :span="4" style="padding: 22px 0px;text-align: center;">
									<span>作出评估决定机关</span>
								</el-col>
								<el-col :span="18" class="border_left" style="padding: 22px 0px;">
									<span style="padding-left: 15px;">{{ companycredit.assessmentAuthority }}</span>
								</el-col>
							</el-row>
							<el-row v-if="showMoveInList">
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>列入黑名单日期</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.abnormalPutdate }}</span>
										</el-col>
									</el-row>
								</el-col>
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>列入黑名单原因</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.specause }}</span>
										</el-col>
									</el-row>
								</el-col>
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>作出决定机关（列入）</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.decorg }}</span>
										</el-col>
									</el-row>
								</el-col>
							</el-row>
							<el-row v-if="showMoveOutList">
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>移出黑名单日期</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.remdate }}</span>
										</el-col>
									</el-row>
								</el-col>
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>移出黑名单原因</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.remexcpres }}</span>
										</el-col>
									</el-row>
								</el-col>
								<el-col>
									<el-row class="border_btm">
										<el-col :span="4" style="padding: 22px 0px;text-align: center;">
											<span>作出决定机关（移出）</span>
										</el-col>
										<el-col :span="18" class="border_left" style="padding: 22px 0px;">
											<span style="padding-left: 15px;">{{ companycredit.redecorg }}</span>
										</el-col>
									</el-row>
								</el-col>
							</el-row>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22">
							<el-form-item label="附件:" prop="enclosure" label-width="120px">
								<iframe id="viewFrame" style="overflow:hidden;height:200px;width:100%;" width="100%" frameBorder="0"
										:src="link"></iframe>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22">
							<div style="float:right;">
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="release()">发布</el-button>
								<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogGongGaoForm = false;clearForm()">取消</el-button>
							</div>
						</el-col>
					</el-row>
				</el-form>
			</div>
		</el-dialog>
		<!-- 查看公告 -->
		<el-dialog title="" :visible.sync="dialogGongGaoViewForm" center fullscreen>
			<el-row>
				<el-col :span="16" :offset="4">
					<div style="margin-top: 10px;">
						<el-form :model="gonggao" :rules="rules" ref="gonggao">
							<!--公开公告信息表-->
							<el-row style="margin-bottom: 10px;">
								<el-col>
									<h4 style="margin-top: 10px;font-size: 40px;text-align: center;">{{ gonggao.title }}</h4>
								</el-col>
							</el-row>
							<el-row style="margin-bottom: 10px;padding-bottom: 10px;font-size: 24px;border-bottom: 1px solid #ddd;text-align: center;">
								<el-col :span="5">
									<span>{{ gonggao.createUser }}</span>
								</el-col>
								<el-col span="4">
									<span>{{ gonggao.inputenTime }}</span>
								</el-col>
								<el-col :span="6">
									<div style="float:right;">
										<span v-if="(gonggao.publicType == 0) ? true : false">服务门户</span>
										<span v-if="(gonggao.publicType == 1) ? true : false">工作门户</span>
										<span v-if="(gonggao.publicType == 2) ? true : false">服务门户和工作门户</span>
									</div>
								</el-col>
								<el-col :span="4">
									<div style="float:right;">
										<span v-if="(gonggao.publicState == 0) ? true : false">未公开</span>
										<span v-if="(gonggao.publicState != 0) ? true : false">公开</span>
									</div>
								</el-col>
								<el-col :span="5">
									<div style="float:right;">
										<span v-if="(gonggao.isPublic == 0) ? true : false">公示通报</span>
										<span v-if="(gonggao.isPublic == 1) ? true : false">标准规范</span>
									</div>
								</el-col>
							</el-row>
							<el-row style="margin: 40px 0;font-size: 24px;">
								<el-col :span="20" :offset="2">
									<!--{{ gonggao.attachContent }}-->
									<span v-html="gonggao.attachContent"></span>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="24">
									<el-form-item label="">
										<iframe width="100%" scrolling="no" style="border: none;"   :src="link"></iframe>
									</el-form-item>
								</el-col>
							</el-row>
							<!--<el-row>
								<el-col>
									<div style="float:right;">
										<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogViewForm = false;clearForm();">取消</el-button>
									</div>
								</el-col>
							</el-row>-->
						</el-form>
					</div>
				</el-col>
			</el-row>

		</el-dialog>
	</div>
</div>
<script>
    var vm = new Vue({
        el: '#companycredit',
        created(){
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            this.orgName = userInfo.orgName;

        },
        data() {
            /*//验证营业执照或三证合一
            let checkICard= (rule, value, callback)=>{
                if(!this.checkCard(value)){
                    callback(new Error('请输入非负数数值'));
                }else {
                    callback();
                }
            };*/
            return {
                idcardLength: 18,
                value1:'',
                uuid:'',
                link:'', // 附件iframe
                currentPage: 1, //默认显示页面为1
                currentPage1: 1,
                pagesize: 10, // 每页的数据条数
                pagesize1: 5,
                tableTotal:'',
                tableTotal1:'',
                // 用户登录信息
                userName: '', // 用户登录名称
                orgName: '', // 组织名称对应项目地址
                orgLevel: '', // 组织等级对应 地市级、省级、中国级地震局用户
                isProvinceRole: false, // 是否为普通用户角色
                companycredit: {
                    expertcreditId: '',// 表单id
                    expertCode: '',
                    expertName: '',
                    expertIdcard: '',
                    certype: '',
                    expertScore: '',
                    expertClassification: '',
                    expertLevl: '',
                    assessmentDate: '',
                    assessmentAuthority: '',
                    abnormalPutdate: '',
                    specause:'',
                    decorg:'',
                    remexcpres:'',
                    remdate: '',
                    redecorg: '',
                    expertNotice: 0 // 拟办公告状态；0为未发布，1为已发布。
                },
                formDisabled: false,
                moveInDisabled: false,
                moveOutDisabled: false,
                rules: {
                    expertCode: [{
                        required: true,
                        message: '请输入专家评分编号',
                        trigger: 'blur'
                    }],
                    expertName: [{
                        required: true,
                        message: '请输入专家名称',
                        trigger: 'blur'
                    }],
                    expertIdcard: [{
                        required: true,
                        message: '请输入证件号码',
                        trigger: 'blur'
                    }/*,{
                        validator: checkICard,
                        message: '最多输入11位的证件号码',
                        trigger: 'blur'
					}*/],
                    certype: [{
                        required: true,
                        message: '请输入证件类型',
                        trigger: 'blur'
                    }],
                    expertScore: [{
                        required: true,
                        message: '请选择专家信用分数',
                        trigger: 'blur'
                    }],
                    expertClassification: [{
                        required: true,
                        message: '请选择专家类型',
                        trigger: 'blur'
                    }],
                    expertLevl: [{
                        required: true,
                        message: '请选择专家等级',
                        trigger: 'blur'
                    }],
                    assessmentDate: [{
                        required: true,
                        message: '请输入评估日期',
                        trigger: 'blur'
                    }],
                    assessmentAuthority: [{
                        required: true,
                        message: '请输入作出评估决定机关',
                        trigger: 'blur'
                    }],
                    abnormalPutdate: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    specause: [{
                        required: true,
                        message: '请输入列入黑名单原因',
                        trigger: 'blur'
                    }],
                    decorg: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    remexcpres: [{
                        required: true,
                        message: '请输入移出黑名单原因',
                        trigger: 'blur'
                    }],
                    remdate: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    redecorg: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
					// 拟制公告公开状态
                    publicState: [{
                        required: true,
                        message: '请选择公开状态',
                        trigger: 'blur'
                    }],
					// 拟制公共--公开地址类型
                    publicType: [{
                        required: true,
                        message: '请选择公开地址类型',
                        trigger: 'blur'
                    }],
					// 拟制公告标题
                    title: [{
                        required: true,
                        message: '请输入拟制公告标题',
                        trigger: 'blur'
                    }]
                },

                // 证件号码校验
                idcardRules: {
                    // 居民身份证
                    111: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkId, message: '居民身份证证件号码格式错误',trigger: 'blur' }],
                    // 临时居民身份证
                    112: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkId, message: '临时居民身份证证件号码格式错误', trigger: 'blur' }],
                    // 户口簿
                    113: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkAccountCard, message: '户口簿证件号码格式错误', trigger: 'blur' }],
                    // 中国人民解放军军官证
                    114: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkOfficerCard, message: '军官证证件号码格式错误', trigger: 'blur' }],
                    // 中国人民武警警察部队警官证
                    115: [{ required : true, message : '证件号码必填', trigger : 'blur'}],
                    // 出生医学证明
                    117: [{ required : true, message : '证件号码必填', trigger : 'blur'}],
                    // 中国人民解放军士兵证
                    118: [{ required : true, message : '证件号码必填', trigger : 'blur'}],

                    // 中国人民武警警察部队士兵证
                    119: [{ required : true, message : '证件号码必填', trigger : 'blur'}],
                    // 中国人民解放军文职人员证
                    120: [{ required : true, message : '证件号码必填', trigger : 'blur'}],
                    // 中国人民武装警察部队文职人员证
                    122: [{ required : true, message : '证件号码必填', trigger : 'blur'}],

                    // 居住证
                    154: [{ required : true, message : '证件号码必填', trigger : 'blur'}],
                    // 外交护照
                    411: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkPassPortCard, message: '外交护照证件号码格式错误', trigger: 'blur' }],
                    // 公务护照
                    412: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkPassPortCard, message: '公务护照证件号码格式错误', trigger: 'blur' }],
                    // 公务普通护照
                    413: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkPassPortCard, message: '公务普通护照证件号码格式错误', trigger: 'blur' }],
                    // 普通护照
                    414: [{ required : true, message : '证件号码必填', trigger : 'blur'},{ validator: checkPassPortCard, message: '普通护照证件号码格式错误', trigger: 'blur' }],
                    // 旅行证
                    415: [{ required : true, message : '证件号码必填', trigger : 'blur'}],

                },
                // 审批
                approvalShi: {
                    publishType: '',
                    publishMsg: ''
                },
                dialogFormVisible: false,
                dialogForm: false,
                dialogGongGaoForm: false, // 拟制公告
                dialogGongGaoViewForm: false, // 查看公告
                formInline: {
                    expertName: ''
                },
				gonggao: {
                    relationId: '',
                    content: '',
                    publicState: 0,
                    publicType: '',
                    title: '', // 拟制公告标题
                    attachContent: '',// 附加内容
                    createUser: '',
                    inputenTime: '',
					isPublic : '0'
                },
                selectForm: {
                    expertCode: '',
                    expertName: '',
                    expertIdcard: '',
                    certype: '',
                    expertScore: '',
                    expertClassification: '',
                    expertLevl: ''
                },
                expertInformation: [],
                currentRow: null,
                tableData: [],
                showMoveInList: false,
                showMoveOutList: false,
                showOnSubmit: true,
                showOnReplace: false,
                showOnJoinList: false
            }
        },
        mounted(){
            this.getData();
            this.getdatatime()
        },
        methods: {

            getdatatime(){
                this.value1 = new Date();
            },
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getAllExpertCred',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let dataInformation = response.data.data.results;
						this.tableTotal = response.data.data.total;// 数据长度
						this.tableData = dataInformation;

                        // 证件加密
                        for(let i = 0; i < dataInformation.length; i++) {
                            var idCard = dataInformation[i].expertIdcard;
                            if(idCard != '') {
                                var newIdcard = '';
                                newIdcard = enctryptIdcard(idCard);
                                this.tableData[i].expertIdcard = newIdcard;
                            }
                        }

					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },
            //获取UUID的方法
            getUuid() {
                axios({
                    method: 'get',
                    url: '/dzjap/uuid/getUuid',
                })
                    .then(response => {
                    console.log(response);
                if (response.data.code == 200) {
                    this.uuid = response.data.data;
                    this.link="../upload/annex.html?uuid="+this.uuid+"&flag=1";
                    console.log(this.uuid);
                } else {
                    this.$message.error(response.data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            // 检查移入和移出黑名单原因是否有值
            checkReason(movein,moveout){
                // 移入黑名单
                if(movein == '' || movein == null || movein == undefined){
                    this.showMoveInList = false;
                }else{
                    this.showMoveInList = true;
                }

                // 移出黑名单
                if(moveout == '' || moveout == null || moveout == undefined){
                    this.showMoveOutList = false;
                }else{
                    this.showMoveOutList = true;
                }
            },
            // 判断查询分数
            checkPriseScore(){
                var val = this.selectForm.expertScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.selectForm.expertScore = val;
            },
            // 判断添加分数
            checkPriseScore1(){
                var val = this.companycredit.expertScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.companycredit.expertScore = val;
            },
            //公用方法，不能输入e和点
            channelInput(e){
                var key = e.key;
                if(key === 'e' || key === '.'){
                    e.returnValue = false;
                    return false;
                }
                return true;
            },

            // 表单提交
            onSubmit(formName) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                this.companycredit.expertcreditId = this.uuid;
                axios({
                    method: 'post',
                    url: '/dzjap/expertCred/addExpertCred',
                    data: this.companycredit
                })
                    .then((response) => {
                        let data = response.data;
                        if (data.code == 200) {
                            this.dialogForm = false;
                            this.$message({
                                type: 'success',
                                message: '添加成功!'
                            });
                            this.getData();
                        } else {
                            this.$message.error(data.msg);
                        }
                    });
                    }else{
                        this.$message.error('输入有误！');
                         return false;
                        }
			        })
            },
            // 加入黑名单
            onJoinBlackList(){
                axios({
                    method: 'post',
                    url: '/dzjap/expertCred/moveinExpertCred',
                    data: this.companycredit
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						this.dialogForm = false;
						// 移入黑名单成功
						this.$message({
							type: 'success',
							message: '移入黑名单成功!'
						});
						this.getData();
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },
            // 表单修改
            onReplace(){
                axios({
                    method: 'post',
                    url: '/dzjap/expertCred/updateExpertCred',
                    data: this.companycredit
                })
				.then((response) => {
					let data = response.data;
					if (data.code == 200) {
						this.dialogForm = false;
						this.$message({
							type: 'success',
							message: '修改成功!'
						});
						this.getData();
					} else {
						this.$message.error(data.msg);
					}
				});
            },
            clearForm(){
                this.showMoveOutList = false;
                this.showMoveInList = false;
                this.moveInDisabled = false;
                this.moveOutDisabled = false;
                // this.$refs[name].clearValidate();
                this.clearFromInformation();
            },
            // 清空表单
            clearFromInformation(){
                this.companycredit.expertcreditId = '';// 表单id
                this.companycredit.expertCode = '';
                this.companycredit.expertName = '';
                this.companycredit.expertIdcard = '';
                this.companycredit.certype = '';
                this.companycredit.expertScore = '';
                this.companycredit.expertClassification = '';
                this.companycredit.expertLevl = '';
                this.companycredit.assessmentDate = '';
                this.companycredit.assessmentAuthority = '';
                this.companycredit.abnormalPutdate = '';
                this.companycredit.specause ='';
                this.companycredit.decorg ='';
                this.companycredit.remexcpres ='';
                this.companycredit.remdate = '';
                this.companycredit.redecorg = '';

                this.gonggao.title = ''; // 拟制公告标题
				this.gonggao.relationId = '';
                this.gonggao.content = '';
                this.gonggao.publicState = 0;
                this.gonggao.publicType = '';
                this.gonggao.attachContent = '';
                this.gonggao.isPublic = '0';

            },
            handleChange(value) {
                console.log(value);
            },
            onSearch(){
				axios({
					method: 'get',
					url: '/dzjap/info/listexpert',
					params:{
						pageSize: this.pagesize1,
						pageNo:this.currentPage1,
						expertName:this.formInline.expertName
					}
				})
				.then(response=> {
					let data=response.data.page.results;
					console.log(data);
 					this.tableTotal1 = response.data.page.total;
					this.expertInformation=data;
				});
			},
            apply(){
                this.dialogForm = true;
                this.showOnSubmit = true;
                this.showOnReplace = false;
                this.showOnJoinList = false;
                this.clearForm();
                this.getUuid();
                this.moveOutDisabled = false;
                this.moveInDisabled = false;

                this.formDisabled = false;
                let date = new Date();
                let y = date.getFullYear();
                let MM = date.getMonth() + 1;
                MM = MM < 10 ? ('0' + MM) : MM;
                let d = date.getDate();
                d = d < 10 ? ('0' + d) : d;
                let h = date.getHours();
                h = h < 10 ? ('0' + h) : h;
                let m = date.getMinutes();
                m = m < 10 ? ('0' + m) : m;
                let s = date.getSeconds();
                s = s < 10 ? ('0' + s) : s;
                let sss = date.getMilliseconds();
                sss = sss < 10 ? ('0' + sss) : sss;
                console.log(y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s +'.'+sss);

                this.companycredit.expertCode = y+''+MM+''+d+''+h+''+m+''+s+''+sss;


            },
            /* 单选搜索表单 */
            selectCurrentChange(val){
                this.currentRow = val;
            },
            /* 搜索结束，回显数据 */
            onAddInformation(){
                this.dialogFormVisible = false; // 关dialog
                this.formInline.expertName = '';
                // 回显数据
                const comInformation = this.currentRow;
                this.companycredit.expertName = comInformation.expertName;
                this.companycredit.expertIdcard = comInformation.expertIdcard;
                this.companycredit.certype = comInformation.certype;
                this.companycredit.expertLevl = comInformation.expertLevl;


            },
            /* 列表页搜索 */
            searchForm(selectForm) {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;

                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getAllConExpertCred',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        expertCode: this.selectForm.expertCode,
                        expertName: this.selectForm.expertName,
                        expertIdcard: this.selectForm.expertIdcard,
                        certype: this.selectForm.certype,
                        expertScore: this.selectForm.expertScore,
                        expertClassification: this.selectForm.expertClassification,
                        expertLevl: this.selectForm.expertLevl
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let dataInformation = response.data.data.results;
						this.tableTotal = response.data.data.total;// 数据长度
						this.tableData = dataInformation;
                        // 证件加密
                        for(let i = 0; i < dataInformation.length; i++) {
                            var idCard = dataInformation[i].expertIdcard;
                            if(idCard != '') {
                                var newIdcard = '';
                                newIdcard = enctryptIdcard(idCard);
                                this.tableData[i].expertIdcard = newIdcard;
                            }
                        }
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },
            /* 列表页重置 */
            resetForm(formName) {
                this.selectForm.expertCode = '';
                this.selectForm.expertName = '';
                this.selectForm.expertIdcard = '';
                this.selectForm.certype = '';
                this.selectForm.expertScore = '';
                this.selectForm.expertClassification = '';
                this.selectForm.expertLevl = '';

                this.getData();
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            handleSizeChange1(size) {
                this.pagesize1 = size;
                this.onSearch();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange1(currentPage) {
                this.currentPage1 = currentPage;
                this.onSearch();
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 设置允许填写和不允许填写
            checkDisabled(n){
                if(n){
                    this.formDisabled = true;
                }else{
                    this.formDisabled = false;
                }
            },
            // 关闭方法
            handleDialogClose(){
                this.dialogFormVisible = false; // 关dialog
                this.formInline.expertName = '';
            },
            // 加入黑名单
            joinBlacklist(index,row){
                this.dialogForm = true;
                this.showOnReplace = false;
                this.showOnSubmit = false;
                this.showOnJoinList = true;

                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getExpertCred',
                    params: {
                        expertcreditId: row.expertcreditId
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let rowdata = response.data.data;
						this.clearForm(); // 重置

						this.companycredit = rowdata;
						// 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
						this.checkReason(rowdata.specause,rowdata.remexcpres);

						this.showMoveInList = true;
						this.moveOutDisabled = true; // 移出模块不许填
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});

                this.checkDisabled(true);
            },
            // 删除
            del(index,row){
                var expertcreditId = row.expertcreditId;

                this.$confirm('确定要删除吗?', '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
                    axios({
                        method: 'post',
                        url: '/dzjap/expertCred/deleteExpertCred',
                        params: {
                            expertcreditId:expertcreditId
                        }
                    })
                        .then(response => {
                            let data = response.data;
                            console.log(response)
                            if (data.code == 200) {
                                // 确认删除
                                this.$message({
                                    type: 'success',
                                    message: '删除成功!'
                                });
                                this.getData();
                            } else {
                                this.$message.error(data.msg);
                            }
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消删除'
                    });
                });
            },
            // 查看
            view(index,row){
                this.dialogForm = true;
                this.showOnReplace = false;
                this.showOnSubmit = false;
                this.showOnJoinList = false;

                this.showInformationView(index,row);
                this.checkDisabled(true);
            },
            // 修改
            edit(index,row){
                this.dialogForm = true;
                this.showOnReplace = true;
                this.showOnSubmit = false;
                this.showOnJoinList = false;

                this.showInformation(index,row);
                this.checkDisabled(false);
            },
			// 证件号码加密展示
            showInformationView(index,row){
                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getExpertCred',
                    params: {
                        expertcreditId: row.expertcreditId
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let rowdata = response.data.data;
                            this.clearForm(); // 重置

                            this.companycredit = rowdata;

                            if(this.companycredit.expertIdcard != "") {
                                this.companycredit.expertIdcard = enctryptIdcard(this.companycredit.expertIdcard);
							}

                            // 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
                            this.checkReason(rowdata.specause,rowdata.remexcpres);

                            this.moveOutDisabled = true;
                            this.moveInDisabled = true;

                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            // 公共方法--查看
            showInformation(index,row){
                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getExpertCred',
                    params: {
                        expertcreditId: row.expertcreditId
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let rowdata = response.data.data;
						this.clearForm(); // 重置

						this.companycredit = rowdata;

						// 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
						this.checkReason(rowdata.specause,rowdata.remexcpres);

						this.moveOutDisabled = true;
						this.moveInDisabled = true;

					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },

			// 拟制公告
            gongGao(index,row){
				this.dialogGongGaoForm = true;
                this.getUuid();
                axios({
                    method: 'get',
                    url: '/dzjap/expertCred/getExpertCred',
                    params: {
                        expertcreditId: row.expertcreditId
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let rowdata = response.data.data;
						this.clearForm(); // 重置

						this.companycredit = rowdata;
						// 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
						this.checkReason(rowdata.specause,rowdata.remexcpres);

						this.moveOutDisabled = true;
						this.moveInDisabled = true;

						this.gonggao.relationId = this.companycredit.expertcreditId;
                        this.gonggao.content =
                            this.companycredit.expertCode + '\r\n' +
                            this.companycredit.expertName +'\r\n' +
                            this.companycredit.expertIdcard + '\r\n' +
                            this.companycredit.certype + '\r\n' +
                            this.companycredit.expertScore + '\r\n' +
                            this.companycredit.expertClassification + '\r\n' +
                            this.companycredit.expertLevl + '\r\n' +
                            this.companycredit.assessmentDate + '\r\n' +
                            this.companycredit.assessmentAuthority + '\r\n' +
                            this.companycredit.abnormalPutdate + '\r\n' +
                            this.companycredit.specause + '\r\n' +
                            this.companycredit.decorg + '\r\n' +
                            this.companycredit.remexcpres + '\r\n' +
                            this.companycredit.remdate + '\r\n' +
                            this.companycredit.redecorg;
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
			},
			// 拟制公告--发布
			release(){
                this.gonggao.relationId = this.companycredit.expertcreditId;
                this.gonggao.publicId = this.uuid;
                this.gonggao.attachContent = this.gonggao.attachContent.replace(/[\n\r]/g,'<br/>');

                axios({
                    method: 'post',
                    url: '/dzjap/publick/addGlPublick',
                    data: this.gonggao
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
					    this.dialogGongGaoForm = false;
						this.clearForm(); // 重置

						// 拟制公告--发布成功
                        this.$message({
                            type: 'success',
                            message: '拟制公告发布成功!'
                        });
                        this.getData();
					} else {
						this.$message.error(data.msg);
                        this.gonggao.attachContent = this.gonggao.attachContent.replace(/<br\/>/g, '\n');
					}
				})
				.catch(function (error) {
					console.log(error);
				});
			},
			// 查看公告
            gongGaoView(index,row){
                this.dialogGongGaoViewForm = true;

                axios({
                    method: 'get',
                    url:'/dzjap/publick/getGlPublick',
                    params: {
                        relationId: row.expertcreditId
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let rowdata = response.data.data;
                    this.clearForm();
                    this.uuid = response.data.data.publicId;
                    this.link="../upload/annex.html?uuid="+this.uuid+"&flag=0";
                    this.gonggao = rowdata;
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
			},
            //验证营业执照或证件三合一
            /*checkCard(str){
                let re=/(^(?:(?![IOZSV])[\dA-Z]){2}\d{6}(?:(?![IOZSV])[\dA-Z]){10}$)|(^\d{15}$)/;
                if (re.test(str)) {
                    return true;
                } else {
                    return false;
                }
            }*/

			// 根据证件类型改变证件号码校验
            changeIdcardRule(data) {

                // if(this.expertmessage.certype == '111' ) {
                //     this.idcardLength = 18;
                // }

                // 将证件号码清空
                this.companycredit.expertIdcard = '';
                // 去除证件号码的格式校验
                this.$refs.expertIdcard.clearValidate();
                // 给表单加上新的校验
                this.rules.expertIdcard = this.idcardRules[data];
            }
        }
    })
</script>
</body>
</html>